package com.restaurant.springboot.service;

import com.restaurant.springboot.entity.OrderEntity;
import com.restaurant.springboot.entity.OrderItemEntity;
import com.restaurant.springboot.entity.vo.OrderItemVO;
import com.restaurant.springboot.entity.vo.OrderVO;
import org.springframework.data.domain.Page;

import java.awt.print.Pageable;
import java.util.Date;
import java.util.List;

/**
 * @Author jack
 * @Date:2019/7/30 14:30
 */
public interface OrderService {

    List<OrderEntity> getAllOrder();

    Page<OrderEntity> getAllOrder(int page, int pageLen);

    Page<OrderEntity> getAllOrder(int page, int pageLen, Date startTime, Date endTime);

    List<OrderEntity> getAllOrderForUser(int userId);

    Page<OrderEntity> getAllOrderForUser(int page ,int pageLen,int userId);

    OrderEntity createOrder(OrderEntity orderEntity);

    boolean cancelOrder(OrderEntity orderEntity);

    OrderEntity getOrderById(Integer id);

    boolean finishOrder(OrderEntity orderEntity);

    boolean handlingOrder(OrderEntity orderEntity);

    boolean createOrderItem(OrderItemEntity orderItemEntity);

    OrderEntity updateOrder(OrderEntity orderEntity);

    boolean isExistsOrder(int orderId);
}
